<?php
$temp = 0;
foreach ($query->result() as $res):
		
	if($res->id_images!=""){
		if($temp=='#eee'){
	 		$bg='#ccc';
			$bgcount = '#FFEE79';
	 		$temp = 1;
	 	} else {
	 		$bg='#eee';
			$bgcount = '#FFFABB';
	 		$temp = 0;
		}
	}
		if($res->images_medium==null || $res->images_medium==false){
			$images = $images = site_url("images/noimages.jpg");
		} else {
			$images = site_url(array('just4u','ImagesMedium','images',$res->id_images));
		}
				$q = $this->db->query("select username from member where id_member='$res->author' limit 1");
				foreach ($q->result() as $re):
						$res->author = $re->username;
				endforeach;
				
	$res->description = word_limiter($res->description,20);
	
?>
<tr bgcolor="<?php echo $bg?>" align="left" valign="top">
      <td class="marginContent"><b><?php echo $res->name."</b><br><br><em>posted by <b>".$res->author ?></b></em></td>
      <td class="marginContent"><img class="picture" width="150" height="auto" src="<?php echo $images?>" /></td>
      <td class="marginContent">
      Small : <a target="new" href="<?php echo site_url(array('just4u','ImagesSmall','images',$res->id_images)); ?>"><?php echo site_url(array('just4u','ImagesSmall','images',$res->id_images)); ?></a><br>
      Medium : <a target="new" href="<?php echo site_url(array('just4u','ImagesMedium','images',$res->id_images)); ?>"><?php echo site_url(array('just4u','ImagesMedium','images',$res->id_images)); ?></a><br>
      Large : <a target="new" href="<?php echo site_url(array('just4u','ImagesLarge','images',$res->id_images)); ?>"><?php echo site_url(array('just4u','ImagesLarge','images',$res->id_images)); ?></a>
      </td>
      <td class="marginContent"><?php echo $res->posted ?></td>
      <td class="marginContent" align="center">
      	<a class="uiButtonRounded" href="<?php echo site_url(array('just4u','event_edit',$res->id_images))?>">Edit</a>
      	<a class="uiButtonRounded" href="javascript: delete_images('<?php echo $res->id_images?>')">Delete</a><br><br>
      	<a class="uiButtonRounded" href="javascript: makecover('<?php echo $res->id_images?>')">Make Cover</a>
      </td>
</tr>
<?php 
endforeach;
?>
